<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Serial Flash (serial-flash)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Serial Flash (serial-flash)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div><div class="header">
  <div class="headertitle"><div class="title">Serial Flash </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p ><a class="anchor" id="md_source_peripherals_serial_flash_README_doxygen"></a> </p>
<h2><a class="anchor" id="autotoc_md1"></a>
Overview</h2>
<p >Provides functions for interacting with an external flash connected through its Single SPI/Dual SPI/Quad SPI/Octal SPI interface. The read operation can be performed in either blocking or non-blocking manner by calling the corresponding function while the write and erase operations are implemented as blocking functions. This library accepts the configuration generated using the QSPI Configurator tool but supports only one memory slot. Note that PSoC™ 6 supports up to 4 memory slots on the same QSPI block.</p>
<h2><a class="anchor" id="autotoc_md2"></a>
Features</h2>
<ul>
<li>Supports asynchronous (non-blocking) read operation</li>
<li>Implements thread-safety for use with multi-threaded RTOS environment using the <a href="https://github.com/infineon/abstraction-rtos">abstraction-rtos</a> library</li>
<li>Accepts the configuration generated by the QSPI Configurator tool</li>
<li>Supports Execute-in-Place (XIP) mode of operation</li>
<li>Provides information about the external memory to the programming tool for it to be able to program the memory, for example, when user wants to place the code into the external memory for XIP operation.</li>
<li>Allows for programming external memory if CY_ENABLE_XIP_PROGRAM is defined when building the application. Note: This is not compatible with the PSoC™ 64 series of devices.</li>
</ul>
<h2><a class="anchor" id="autotoc_md3"></a>
Quick Start</h2>
<ol type="1">
<li>Add #include "cy_serial_flash_qspi.h"</li>
<li>Add <code>DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE</code> in the Makefile to enable thread-safety when used in a multi-threaded RTOS environment</li>
<li>See the <a href="https://github.com/infineon/mtb-example-psoc6-qspi-readwrite">PSoC™ 6 MCU: QSPI Flash Read and Write</a> code example to learn using this library</li>
</ol>
<p ><b>NOTE:</b> If you delete the contents of the GeneratedSource directory inside the BSP, you must re-generate the memory configuration files <em>cycfg_qspi_memslot.c/.h</em>. To do this from inside the ModusToolbox™ IDE, open the QSPI Configurator tool from the Quick Panel and press <b>Ctrl+S</b> or click <b>File &gt; Save</b>. If you open the tool outside the IDE, you need to first open the <em>design.cyqspi</em> file in the tool. To do this, click <b>File &gt; Import</b> and then locate the file inside the BSP under <em>config</em> directory.</p>
<p ><b>NOTE:</b> For devices with no internal flash (eg:CAT1B device CYW20829), user needs to disable 'config data in flash' option in QSPI Configurator.</p>
<h2><a class="anchor" id="autotoc_md4"></a>
Dependencies</h2>
<ul>
<li><a href="https://github.com/infineon/abstraction-rtos">abstraction-rtos</a> library if <code>DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE</code> is added in the Makefile</li>
</ul>
<h2><a class="anchor" id="autotoc_md5"></a>
More information</h2>
<ul>
<li><a href="https://infineon.github.io/serial-flash/html/index.html">API Reference Guide</a></li>
<li><a href="http://www.cypress.com">Cypress Semiconductor, an Infineon Technologies Company</a></li>
<li><a href="https://github.com/infineon">Infineon GitHub</a></li>
<li><a href="https://www.cypress.com/products/modustoolbox-software-environment">ModusToolbox™</a></li>
<li><a href="https://github.com/infineon/Code-Examples-for-ModusToolbox-Software">PSoC™ 6 Code Examples using ModusToolbox™ IDE</a></li>
<li><a href="https://github.com/Infineon/modustoolbox-software">ModusToolbox™ Software</a></li>
<li><a href="https://community.cypress.com/docs/DOC-14644">PSoC™ 6 Resources - KBA223067</a></li>
</ul>
<hr  />
<p> © Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2021. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Serial Flash (serial-flash)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
